package by.bsu.android.lab.gmap;

public class MyItemizedOverlay extends ItemizedOverlay<OverlayItem> {

    private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>();
    private Context mContext;

    public MyItemizedOverlay(Drawable defaultMarker) {
	super(boundCenterBottom(defaultMarker));
    }

    public MyItemizedOverlay(Drawable defaultMarker, Context context) {
	super(defaultMarker);
	mContext = context;
    }

    @Override
    protected OverlayItem createItem(int i) {
	return mOverlays.get(i);
    }

    @Override
    public int size() {
	return mOverlays.size();
    }

    public void addOverlay(OverlayItem overlay) {
	mOverlays.add(overlay);
	populate();
    }

}
